//选中了数据库
function selDB() {
    let dbVal = $('#db').val();
    if (dbVal != null && dbVal != "") {
        $.ajax({
            url: '/document/read/readTables',
            type: 'post',
            data: 'shcemaName=' + dbVal,
            dataType: 'json',
            success: function (result) {
                let str = '<option value="">全部</option>';
                for (let o of result) {
                    str += ('<option value="' + o.TABLE_NAME + '">' + o.TABLE_NAME + '</option>');
                }
                $('#tb').empty();
                $('#tb').append(str);
            }
        });
    }
}

function exportDoc() {
    let fdata = $("#docForm").serialize();
    $.ajax({
        url: '/document/export/exportDoc',
        type: 'get',
        data: fdata + "&isTest=true",
        success: function (result) {
            window.location.href = "/document/export/exportDoc?" + fdata;
        },
        error: function (result) {
            layer("生成失败");
        }
    });
}
